/* ------------------------------------------
  Media Queries
---------------------------------------------*/

/* Screen sizes > 1241px --------------------- */
@media all and (min-width:1401px) {
  .containment,
  .limiter {
    width: 100%;
    min-width: 680px;
    max-width: 840px;
  }
}

/* Screen sizes < 1200px --------------------- */
@media all and (max-width:1400px) {

  .icon.branding {
    background-position:0 -115px;
  }
  .loading {
    background:rgb(255,255,255);
    background:rgba(255,255,255,0.9);
    border:1px solid #D4D7D9;
    top:50%;
    left:50%;
    width:180px;
    margin:-120px 0 0 -90px;
    padding:30px 0;
    text-align:center;
    font-size:16px;
    line-height:30px;
    box-shadow:0 1px 0 rgba(255, 255, 255, 0),
    0 0 10px rgba(0, 0, 0, 0.1);
  }
  .loading .loading-icon {
    background-image:url('../img/loader@55x55.gif');
    margin:0 auto 5px;
    width:55px;
    height:55px;
  }

  /* Display the Prose Menu in the footer */
  .dropdown-menu.prose-menu {
    width:100%;
    position:static;
    border-top:1px solid #d4d7d9;
  }
  .prose-menu:hover {
    background-color:transparent;
  }
  .prose-menu .branding {
    float:left;
  }
  .prose-menu .dropdown {
    background:transparent;
    display:block;
    position:static;
    width:auto;
    float:left;
    padding:0 0 8px;
  }
  .authenticated .prose-menu .dropdown .divider,
  .prose-menu .dropdown .divider {
    display:none;
  }
  .dropdown-menu .dropdown a {
    color:inherit;
    padding:0 0 0 8px;
  }
  .dropdown-menu .dropdown a:hover {
    background:transparent;
  }

  .heading {
    padding:20px 15px;
  }
  .content-search {
    margin:8px 15px 15px;
  }

  .containment {
    width: 100%;
    margin: 0;
  }

  .limiter {
    width: 70%;
    margin: 0;
  }

  .fixed .containment {
    padding-right:60px;
  }
  .open .fixed .containment,
  .open .limiter {
    width:70%;
    margin:0;
    padding:0;
  }
  .sidebar {
    width:30%;
  }

  .meta .finish {
    -webkit-border-radius:4px;
    border-radius:4px;
  }

  /* Some right alignment adjustments
  * to account for the fixed vertical menu */
  .fixed .col-last {
    padding-right:60px;
  }
  .post .view {
    padding:15px;
  }
}

/* Screen sizes < 800px --------------------- */
@media all and (max-width:800px) {
  .listing .actions /* Extraneous links in the listings */ {
    display:none!important;
    }
  .toolbar .group li .on:before,
  .toolbar .group li .on:after {
    display:none!important;
    }
  }

/* iPad (portrait and landscape) ----------- */
@media only screen
and (min-device-width:768px)
and (max-device-width:1024px) {

.post .markdown .view.diff pre,
.markdown .CodeMirror,
.code .CodeMirror-scroll {
  font-size:16px;
  line-height:1.9em
  }
  /* Disable fixed positioning of the topbar as its wacky for touch */
  .topbar.fixed {
    position:relative;
    }
  .fixed .containment,
  .open .fixed .containment {
    width:100%;
    }
  .details .mask,
  .popup { /* tip messages served on mouse hover */
    display:none!important;
    }
  #navigation {
    border-color:#D4D7D9;
    }
}

/* iPad (portrait) ----------- */
@media only screen
and (min-device-width:768px)
and (max-device-width:1024px)
and (orientation:portrait) {
  .open .fixed .containment,
  .open .limiter {
    width:60%;
  }
  .sidebar {
    width:40%;
  }
}

/* Smartphone (portrait and landscape) ----------- */
@media only screen
and (min-device-width:320px)
and (max-device-width:480px) {
  html, body {
  -webkit-text-size-adjust:none;
          text-size-adjust:none;
    }

  .details .mask,
  .edit .topbar-wrapper, /* wysiwyg toolbar */
  .popup { /* tip messages served on mouse hover */
    display:none!important;
    }
  #navigation .nav.mobile {
    display:block;
    }

  .post .view .code,
  .editor {
    padding:0;
    }

  /* Disable fixed positioning of the topbar as its wacky for touch */
  .topbar.fixed {
    position:relative;
    }

  .inner.deep {
    padding:15px;
    }
  .containment,
  .limiter,
  .open .limiter {
    width:100%;
    padding-right:60px;
    }
    .fixed .containment,
    .open .fixed .containment {
      width:100%;
      }
  .sidebar {
    width:100%;
    height:100%;
    border:none;
    -webkit-box-shadow:none;
            box-shadow:none;
    }
   #navigation  {
      border-color:#D4D7D9;
      }
    .sidebar.open {
      right:-100%;
      }
    .sidebar.open.mobile {
      right:0;
      }
    .sidebar .listing li a {
      font-size:16px;
      font-weight:700;
      padding:12px 15px;
      }
      .listing .overlay {
        padding:12px 15px;
        }

  .avatar {
    width:40px;
    height:40px;
    }
    .avatar .ico,
    .avatar .icon {
      line-height:40px;
      }
    .heading .details {
      padding-left:55px;
      }
    .file .save .status {
      top:5px;
      left:5px;
      }
      .save .save .status {
        top:0;
        right:0;
        left:auto;
        }

  .post .view.meta {
    width:80%;
    }
    .meta .form-item,
    .meta .form {
      padding:0;
      }
}

/* Retina Rules ----------------------- */
@media
only screen and (-webkit-min-device-pixel-ratio:2),
only screen and (min-device-pixel-ratio:2) {

  .icon,
  .chzn-container-single .chzn-single abbr,
  .chzn-container-single .chzn-single div b,
  .chzn-container .chzn-results-scroll-down span,
  .chzn-container-multi .chzn-choices .search-choice .search-choice-close {
    background-image:url('../img/sprite@2x.png');
    background-size:400px 150px;
    }

  .loading .loading-icon {
    background-image:url('../img/loader@110x110.gif');
    background-size:55px 55px;
    }
}
